/**
 * Created by Administrator on 2017/8/3.
 */
import Vue from 'vue'
import Router from 'vue-router'
import store from '../../vuex/store'
import axios from '../../axios/http'
import YDUI from 'vue-ydui'
import 'vue-ydui/dist/ydui.rem.css'
import '../../../mock/mock.js'
import 'vue-event-calendar/dist/style.css' //1.1.10之后的版本，css被放在了单独的文件中，方便替换
import vueEventCalendar from 'vue-event-calendar'

import index from './index.vue'
import '../healths.css'

// 将axios挂载到prototype上，在组件中可以直接使用this.axios访问
Vue.prototype.axios = axios
Vue.use(vueEventCalendar, {locale: 'en'}) //可以设置语言，支持中文和英文

// 首页（index）
import welcome from './index/welcome.vue'
import test from './test/test.vue'
import home from './index/home.vue'
import sign from './index/sign.vue'
import medicine from './index/medicine.vue'
import message from './index/message.vue'
import systemmsg from './index/systemmsg.vue'
import systemmsgdetail from './index/systemmsgdetail.vue'
import bill from './index/bill.vue'
import billcase from './index/billcase.vue'
import billcheck from './index/billcheck.vue'

// 注册登录（reg）
import reg from './reg/reg.vue'
import reginfo from './reg/reginfo.vue'
import regsick from './reg/regsick.vue'

// 问医（seek）
import seek from './seek/seek.vue'
import seekdetail from './seek/seekdetail.vue'
import seekinfo from './seek/seekinfo.vue'

// 个人中心（me）
import me from './me/me.vue'
import points from './me/points.vue'
import pointsdetail from './me/pointsdetail.vue'
import pointsrule from './me/pointsrule.vue'
import info from './me/info.vue'
import evals from './me/eval.vue'
import evaldetail from './me/evalDetail.vue'
import account from './me/account.vue'
import accountapply from './me/accountapply.vue'
import refundrequired from './me/refundrequired.vue'
import subscribe from './me/subscribe.vue'
import setting from './me/set.vue'
import prototcol from './me/prototcol.vue'
import about from './me/about.vue'
import contact from './me/contact.vue'

Vue.use(YDUI);
Vue.use(Router)

const router = new Router({
  hashbang: false, 
  history: true,
	routes: [
    {
      path: '/',
      name: 'welcome',
      component: welcome
    },{
      path: '/test',
      name: 'test',
      component: test
    },{
      path: '/home',
      name: 'home',
      component: home
    },{
      path: '/sign',
      name: 'sign',
      component: sign
    },{
      path: '/medicine',
      name: 'medicine',
      component: medicine
    },{
      path: '/message',
      name: 'message',
      component: message
    },{
      path: '/systemmsg',
      name: 'systemmsg',
      component: systemmsg
    },{
      path: '/systemmsgdetail',
      name: 'systemmsgdetail',
      component: systemmsgdetail
    },{
      path: '/bill',
      name: 'bill',
      component: bill
    },{
      path: '/billcase',
      name: 'billcase',
      component: billcase
    },{
      path: '/billcheck',
      name: 'billcheck',
      component: billcheck
    },

    {
      path: '/reg',
      name: 'reg',
      component: reg
    },{
      path: '/reginfo',
      name: 'reginfo',
      component: reginfo
    },{
      path: '/regsick',
      name: 'regsick',
      component: regsick
    },

    {
      path: '/seek',
      name: 'seek',
      component: seek
    },{
      path: '/seekdetail',
      name: 'seekdetail',
      component: seekdetail
    },{
      path: '/seekinfo',
      name: 'seekinfo',
      component: seekinfo
    },

    {
      path: '/me',
      name: 'me',
      component: me
    },{
      path: '/points',
      name: 'points',
      component: points
    },{
      path: '/pointsdetail',
      name: 'pointsdetail',
      component: pointsdetail
    },{
      path: '/pointsrule',
      name: 'pointsrule',
      component: pointsrule
    },{
      path: '/info',
      name: 'info',
      component: info
    },{
      path: '/evals',
      name: 'evals',
      component: evals
    },{
      path: '/evaldetail',
      name: 'evaldetail',
      component: evaldetail
    },{
      path: '/account',
      name: 'account',
      component: account
    },{
      path: '/accountapply',
      name: 'accountapply',
      component: accountapply
    },{
      path: '/refundrequired',
      name: 'refundrequired',
      component: refundrequired
    },{
      path: '/subscribe',
      name: 'subscribe',
      component: subscribe
    },{
      path: '/setting',
      name: 'setting',
      component: setting
    },{
      path: '/prototcol',
      name: 'prototcol',
      component: prototcol
    },{
      path: '/about',
      name: 'about',
      component: about
    },{
      path: '/contact',
      name: 'contact',
      component: contact
    }
	]
})

new Vue({
	el: '#app',
	router,
  store,
  axios,
	template: '<router-view></router-view>',
	// template: '<keep-alive><router-view></router-view></keep-alive>',
	components: { index	}
})
